﻿using System.Collections.ObjectModel;
using SmartMobile.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SMARTMobile.WinPhone.Models;

namespace SMARTMobile.Models.UI
{
    public class OutletAdvanceInforListingModel : OutletAdvanceInforListing
    {
        private ObservableCollection<OutletAdvanceInforTable> _childInfo;
        private ObservableCollection<object> _childUIInfo;

        public OutletAdvanceInforListingModel(OutletAdvanceInforListing model)
        {
            this.ID_FK = model.ID_FK;
            this.DataTable = model.DataTable;
            this.InforName = model.InforName;
            this.IsShow = model.IsShow;
            this.ShowOrder = model.ShowOrder;
            this.ChildInfo = new ObservableCollection<OutletAdvanceInforTable>();
            //var dt = new DataTable();
            //dt.Columns.Add(new DataColumn("test"));
            //dt.Columns.Add(new DataColumn("test1"));
            //this.ChildUIInfo = dt;

        }

        public ObservableCollection<OutletAdvanceInforTable> ChildInfo
        {
            get
            {
                return _childInfo;
            }
            set
            {
                _childInfo = value;
                base.SendPropertyChanged("ChildInfo");
            }
        }

        public ObservableCollection<object> ChildUIInfo
        {
            get
            {
                return _childUIInfo;
            }
            set
            {
                _childUIInfo = value;
                base.SendPropertyChanged("ChildUIInfo");
            }
        }
    }
}
